﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChessSuite.Utilities.Common.Utilities
{
    public static partial class BitBoardUtility
    {
        #region Assertions.
        // Dummy method - no tests will be written for this one.... all cases takes forever anyhood.
        public static void AssertBoardsNonOverlapping(BitBoard x, BitBoard y)
        {
            AssertBoardsNonOverlapping(x.InternalBoard, y.InternalBoard);
        }

        // Dummy method - no tests will be written for this one.... all cases takes forever anyhood.
        public static void AssertBoardsNonOverlapping(ulong x, ulong y)
        {
            if ((x & y) != 0)
                throw new ArgumentException(Resources.BOARDS_CANNOT_HAVE_PIECES_ON_SAME_FIELDS_EXCEPTION);
        }
        #endregion

        #region Miscellaneous.
        public static bool KingIsPresentOnField(this Position king, int f, int r)
        {
            return king != null && king.File == f && king.Rank == r;
        }
        #endregion
    }
}
